#ifndef PLAYER_H
#define PLAYER_H

#include "Game.h"

class Player: public sf::Drawable {

public:
	enum Direction {Down, Left, Right, Up};

	Player();

	void startmove(Player::Direction direction);
	void update(const sf::Time& elapsed);
	void stopmove();
	 //The sprites rectangle for drawing.

	
private:
	sf::Time delay;
	Direction direction;
	sf::RectangleShape rect;
	sf::Texture walkingright;
	sf::Sprite walkrspr;

	bool moving;
	int speed;
	int sourceX; // The left Point of box
	int sourceY; // The top point of box
	int addX; //The legnth of box
	int addY; //The width of box

	void rightMove ();
	virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const;
};

#endif // PLAYER_H